import constant from "../../constant"
import storage from '../../utils/storage'
export default {
    namespaced: true,
    state: () => ({
        sidebarOpened: true,
        language: storage.getItem(constant.LANG) || 'zh'
    }),
    mutations: {
        triggerSidebarOpened(state){
            state.sidebarOpened = !state.sidebarOpened
        },
        setLanguage(state, lang){
            state.language = lang
            storage.setItem(constant.LANG, lang)
        }
    },
    actions: {

    }
}